package myschool.array.homework;

import java.util.Arrays;

public class ArraySortingPpt {
    public static void main(String[] args) {
        int[] number = {3,2,3,-1,0,6};
        for (int i = 0; i <number.length-1 ; i++) {
        int numberOne = i;
            for (int j = i+1; j <number.length ; j++) {
                if(number[j] > number[numberOne]){
                    numberOne = j;
                }
            }
            if(numberOne != i){
                int numberTwo = number[i];
                number[i] = number[numberOne];
                number[numberOne] = numberTwo;
            }
        }
        System.out.println(Arrays.toString(number));
    }
}
